/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for hrm_militaryregistration
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_militaryregistration extends PO implements I_hrm_militaryregistration, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20120802L;

    /** Standard Constructor */
    public X_hrm_militaryregistration (Properties ctx, int hrm_militaryregistration_ID, String trxName)
    {
      super (ctx, hrm_militaryregistration_ID, trxName);
      /** if (hrm_militaryregistration_ID == 0)
        {
			setC_BPartner_ID (0);
			sethrm_militaryregistration_ID (0);
			setProcessed (false);
// N
        } */
    }

    /** Load Constructor */
    public X_hrm_militaryregistration (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_militaryregistration[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_defenceadministrname.
		@param hrm_defenceadministrname hrm_defenceadministrname	  */
	public void sethrm_defenceadministrname (String hrm_defenceadministrname)
	{
		set_Value (COLUMNNAME_hrm_defenceadministrname, hrm_defenceadministrname);
	}

	/** Get hrm_defenceadministrname.
		@return hrm_defenceadministrname	  */
	public String gethrm_defenceadministrname () 
	{
		return (String)get_Value(COLUMNNAME_hrm_defenceadministrname);
	}

	public I_hrm_fitnessmilitary gethrm_fitnessmilitary() throws RuntimeException
    {
		return (I_hrm_fitnessmilitary)MTable.get(getCtx(), I_hrm_fitnessmilitary.Table_Name)
			.getPO(gethrm_fitnessmilitary_ID(), get_TrxName());	}

	/** Set hrm_fitnessmilitary.
		@param hrm_fitnessmilitary_ID hrm_fitnessmilitary	  */
	public void sethrm_fitnessmilitary_ID (int hrm_fitnessmilitary_ID)
	{
		if (hrm_fitnessmilitary_ID < 1) 
			set_Value (COLUMNNAME_hrm_fitnessmilitary_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_fitnessmilitary_ID, Integer.valueOf(hrm_fitnessmilitary_ID));
	}

	/** Get hrm_fitnessmilitary.
		@return hrm_fitnessmilitary	  */
	public int gethrm_fitnessmilitary_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_fitnessmilitary_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_militaryrank gethrm_militaryrank() throws RuntimeException
    {
		return (I_hrm_militaryrank)MTable.get(getCtx(), I_hrm_militaryrank.Table_Name)
			.getPO(gethrm_militaryrank_ID(), get_TrxName());	}

	/** Set hrm_militaryrank.
		@param hrm_militaryrank_ID hrm_militaryrank	  */
	public void sethrm_militaryrank_ID (int hrm_militaryrank_ID)
	{
		if (hrm_militaryrank_ID < 1) 
			set_Value (COLUMNNAME_hrm_militaryrank_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_militaryrank_ID, Integer.valueOf(hrm_militaryrank_ID));
	}

	/** Get hrm_militaryrank.
		@return hrm_militaryrank	  */
	public int gethrm_militaryrank_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_militaryrank_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hr militaryregistration.
		@param hrm_militaryregistration_ID hr militaryregistration	  */
	public void sethrm_militaryregistration_ID (int hrm_militaryregistration_ID)
	{
		if (hrm_militaryregistration_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_militaryregistration_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_militaryregistration_ID, Integer.valueOf(hrm_militaryregistration_ID));
	}

	/** Get hr militaryregistration.
		@return hr militaryregistration	  */
	public int gethrm_militaryregistration_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_militaryregistration_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_militaryspeciality.
		@param hrm_militaryspeciality hrm_militaryspeciality	  */
	public void sethrm_militaryspeciality (String hrm_militaryspeciality)
	{
		set_Value (COLUMNNAME_hrm_militaryspeciality, hrm_militaryspeciality);
	}

	/** Get hrm_militaryspeciality.
		@return hrm_militaryspeciality	  */
	public String gethrm_militaryspeciality () 
	{
		return (String)get_Value(COLUMNNAME_hrm_militaryspeciality);
	}

	/** Set hrm_recordkeepingcategory.
		@param hrm_recordkeepingcategory hrm_recordkeepingcategory	  */
	public void sethrm_recordkeepingcategory (String hrm_recordkeepingcategory)
	{
		set_Value (COLUMNNAME_hrm_recordkeepingcategory, hrm_recordkeepingcategory);
	}

	/** Get hrm_recordkeepingcategory.
		@return hrm_recordkeepingcategory	  */
	public String gethrm_recordkeepingcategory () 
	{
		return (String)get_Value(COLUMNNAME_hrm_recordkeepingcategory);
	}

	/** Set hrm_recordkeepinggroup.
		@param hrm_recordkeepinggroup hrm_recordkeepinggroup	  */
	public void sethrm_recordkeepinggroup (String hrm_recordkeepinggroup)
	{
		set_Value (COLUMNNAME_hrm_recordkeepinggroup, hrm_recordkeepinggroup);
	}

	/** Get hrm_recordkeepinggroup.
		@return hrm_recordkeepinggroup	  */
	public String gethrm_recordkeepinggroup () 
	{
		return (String)get_Value(COLUMNNAME_hrm_recordkeepinggroup);
	}

	/** Set hrm_recordkeepingno.
		@param hrm_recordkeepingno hrm_recordkeepingno	  */
	public void sethrm_recordkeepingno (String hrm_recordkeepingno)
	{
		set_Value (COLUMNNAME_hrm_recordkeepingno, hrm_recordkeepingno);
	}

	/** Get hrm_recordkeepingno.
		@return hrm_recordkeepingno	  */
	public String gethrm_recordkeepingno () 
	{
		return (String)get_Value(COLUMNNAME_hrm_recordkeepingno);
	}

	public I_hrm_structure gethrm_structure() throws RuntimeException
    {
		return (I_hrm_structure)MTable.get(getCtx(), I_hrm_structure.Table_Name)
			.getPO(gethrm_structure_ID(), get_TrxName());	}

	/** Set hrm_structure.
		@param hrm_structure_ID hrm_structure	  */
	public void sethrm_structure_ID (int hrm_structure_ID)
	{
		if (hrm_structure_ID < 1) 
			set_Value (COLUMNNAME_hrm_structure_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_structure_ID, Integer.valueOf(hrm_structure_ID));
	}

	/** Get hrm_structure.
		@return hrm_structure	  */
	public int gethrm_structure_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_structure_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), String.valueOf(gethrm_structure_ID()));
    }

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Search Key.
		@param Value 
		Search key for the record in the format required - must be unique
	  */
	public void setValue (String Value)
	{
		set_Value (COLUMNNAME_Value, Value);
	}

	/** Get Search Key.
		@return Search key for the record in the format required - must be unique
	  */
	public String getValue () 
	{
		return (String)get_Value(COLUMNNAME_Value);
	}
}